setTimeout(function(){

	//面板显示逻辑
		
	btn = shrinkBtn('标题助手');
	html = titlePanel();
	
    $('html body').append(btn);
	$('html body').append(html);
	
	

  
  
//------------------------------------------事件点击---------------------------------------------------
// 标题搜索
$('.title_search').click(function(){
	key_str = $('.title_keyword').val();
	if(!key_str){
		layer.msg('请先输入关键字');
		return false;
	}
	if(key_str.indexOf(',') == -1){
		layer.msg('至少输入两个关键字');
		return false;
	}
	key_arr = key_str.split(',');
	titleArr = titleSearch(key_arr);
	
    that = $('.title_search_list');
	that.html('');
	if(titleArr){
		
		if(titleArr.length > 0){
			for(let title of titleArr){
				console.log(title);
				tmp = `<p style="padding:5px 5px 5px 15px;color:blue;font-weight:bold">
					${title} 
				   <button  style="margin-left:15px;background:rgba(150,155,250,144);width:70px;color: #fff;font-weight: bold;background:  skyblue;border: none;
                border-radius: 3px;" data-str="${title}" class="cpTitle">复制</button>
				</p>`;
				that.append(tmp);
			}
		}else{
			wordsAppend(that,'暂无数据',2);
		}
		
	}else{
		wordsAppend(that,'请先登录易撰平台',2);
	}
})

$(document).on("click", ".cpTitle",function () {
	content = $(this).data('str');
	console.log(content);
	copyToClipboard(content);
	layer.msg('复制成功');
})


// 缩放按钮点击
$('.btn_shrink').click(function(){
	style = $('.panel').attr('style');
	if(style.indexOf('block') != -1){
		$('.panel').css('display','none');
	}else{
		$('.panel').css('display','block');
	}
})


  

},1500);


